package com.liu.community.mapper;/*
 *@Author:Liu Xing-zhi
 *Description:
 *Date:Crated in 18:37 2021/10/16
 */

import com.liu.community.pojor.Notification;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface NotificationMapper {


    void insert(Notification notification);

    Integer queryDataTotalCountByUserId(@Param("userId")Integer userId);

    List<Notification> queryAllNotificationByUserId(@Param("userId")Integer userId, @Param("begin")Integer begin,@Param("pageSize")Integer pageSize);

    Integer queryUnReadCountById(@Param("userId")Integer userId);

    Notification queryNotificationById(@Param("id")Integer id);

    void updateRead(@Param("id")Integer id,@Param("status")Integer status);
}
